package com.xiemulei.gulimall.auth.feign;

import com.xiemulei.common.utils.R;
import com.xiemulei.common.vo.SocialUserVo;
import com.xiemulei.common.vo.UserLoginVo;
import com.xiemulei.common.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@FeignClient("gulimall-member")
public interface MemberFeignClient {

    @PostMapping("/member/member/register")
    R register(@RequestBody UserRegisterVo vo);

    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    @PostMapping("/member/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUserVo socialUserVo) throws Exception;
}
